import createAxios from '/@/utils/axios'

export const url = '/site/routine.Shop/'

export const actionUrl = new Map([
    ['index', url + 'index'],
    ['edit', url + 'edit'],
])

export function index() {
    return createAxios({
        url: actionUrl.get('index'),
        method: 'get',
    })
}


export function postData(data: anyObj) {
    return createAxios(
        {
            url: actionUrl.get('edit'),
            method: 'post',
            data: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}

/**
 * 同步店铺
 */
export function syncShop() { //
    return createAxios({
        url: '/site/routine.Shop/sync',
        method: 'post',
    }, { loading: true ,showSuccessMessage: true});
}

